function [txn] = mapper(inp)
    [ncol,nrow] = size(inp);
    txn = zeros(1,4*(ncol*nrow));
    bin_inp = zeros(1,8); %#ok<NASGU>
for index = 1:numel(inp)
    bin_inp = de2bi(inp(index),8);
%     txn(4*((index) - 1) + 1) = complex(((2*double(bin_inp(1)) - 1)/sqrt(2)),((2*double(bin_inp(2)) - 1)/sqrt(2)));
%     txn(4*((index) - 1) + 2) = complex(((2*double(bin_inp(3)) - 1)/sqrt(2)),((2*double(bin_inp(4)) - 1)/sqrt(2)));
%     txn(4*((index) - 1) + 3) = complex(((2*double(bin_inp(5)) - 1)/sqrt(2)),((2*double(bin_inp(6)) - 1)/sqrt(2)));
%     txn(4*((index) - 1) + 4) = complex(((2*double(bin_inp(7)) - 1)/sqrt(2)),((2*double(bin_inp(8)) - 1)/sqrt(2)));

    txn(4*((index) - 1) + 1) = alternatemap(complex(((2*double(bin_inp(1)) - 1)/sqrt(2)),((2*double(bin_inp(2)) - 1)/sqrt(2))));
    txn(4*((index) - 1) + 2) = alternatemap(complex(((2*double(bin_inp(3)) - 1)/sqrt(2)),((2*double(bin_inp(4)) - 1)/sqrt(2))));
    txn(4*((index) - 1) + 3) = alternatemap(complex(((2*double(bin_inp(5)) - 1)/sqrt(2)),((2*double(bin_inp(6)) - 1)/sqrt(2))));
    txn(4*((index) - 1) + 4) = alternatemap(complex(((2*double(bin_inp(7)) - 1)/sqrt(2)),((2*double(bin_inp(8)) - 1)/sqrt(2))));

end